Fix client disconnections caused by incorrect metadata offsets in horse packets#29
Merged
Tofaa2 merged 2 commits intoTofaa2:masterfrom May 1, 2025
Merged
Conversation
…r methods Inheriting from MobMeta caused incorrect metadata offsets for horses, leading to client disconnections when metadata packets were sent. Vanilla horses don't synchronize Owner UUID via metadata, making the previous owner methods non-functional client-side. Changing inheritance to AgeableMeta also enables baby horse functionality.
…rong-horse-parent-class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR resolves an issue where clients would disconnect when receiving horse entity metadata packets.
Previously,
BaseHorseMetainherited fromMobMetaand implemented methods for setting/getting an Owner UUID. However, vanilla Minecraft'sAbstractHorseclass does not synchronize the owner between server and client (unlikeTamableAnimalwhich does). This difference meant that when sending packets, the data was positioned at indices the client didn't expect for horses, causing misalignment and disconnections.This fix changes
BaseHorseMetato inherit fromAgeableMetainstead, which correctly aligns the starting metadata index with vanilla's structure for horses. The non-functionalgetOwner()andsetOwner()methods have been removed as they were relying on non-existent synchronized data.These changes also properly enable the baby flag functionality for horses and related entities to work.